Integrand size = 28, antiderivative size = 214 \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{3/2} c^2 f}-\frac {9 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{8 \sqrt {2} a^{3/2} c^2 f}+\frac {7 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{8 a^2 c^2 f}+\frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f} \]
[Out]
Time = 0.49 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3989, 3972, 483, 597, 536, 209} \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{3/2} c^2 f}-\frac {9 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a \sec (e+f x)+a}}\right )}{8 \sqrt {2} a^{3/2} c^2 f}+\frac {\cot ^3(e+f x) (a \sec (e+f x)+a)^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a \sec (e+f x)+a)^{3/2}}{4 a^3 c^2 f}+\frac {7 \cot (e+f x) \sqrt {a \sec (e+f x)+a}}{8 a^2 c^2 f} \]
[In]
[Out]
Rule 209
Rule 483
Rule 536
Rule 597
Rule 3972
Rule 3989
Rubi steps \begin{align*} \text {integral}& = \frac {\int \cot ^4(e+f x) \sqrt {a+a \sec (e+f x)} \, dx}{a^2 c^2} \\ & = -\frac {2 \text {Subst}\left (\int \frac {1}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^3 c^2 f} \\ & = -\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f}-\frac {\text {Subst}\left (\int \frac {-a-5 a^2 x^2}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{2 a^4 c^2 f} \\ & = \frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f}+\frac {\text {Subst}\left (\int \frac {21 a^2-3 a^3 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{12 a^4 c^2 f} \\ & = \frac {7 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{8 a^2 c^2 f}+\frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f}-\frac {\text {Subst}\left (\int \frac {69 a^3+21 a^4 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{24 a^4 c^2 f} \\ & = \frac {7 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{8 a^2 c^2 f}+\frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f}+\frac {9 \text {Subst}\left (\int \frac {1}{2+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{8 a c^2 f}-\frac {2 \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a c^2 f} \\ & = \frac {2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{a^{3/2} c^2 f}-\frac {9 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {2} \sqrt {a+a \sec (e+f x)}}\right )}{8 \sqrt {2} a^{3/2} c^2 f}+\frac {7 \cot (e+f x) \sqrt {a+a \sec (e+f x)}}{8 a^2 c^2 f}+\frac {\cot ^3(e+f x) (a+a \sec (e+f x))^{3/2}}{12 a^3 c^2 f}-\frac {\cos (e+f x) \cot ^3(e+f x) \sec ^2\left (\frac {1}{2} (e+f x)\right ) (a+a \sec (e+f x))^{3/2}}{4 a^3 c^2 f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.47 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.48 \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\frac {\left (-6+9 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},\frac {1}{2} (1-\sec (e+f x))\right ) (1+\sec (e+f x))-8 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},1-\sec (e+f x)\right ) (1+\sec (e+f x))\right ) \tan (e+f x)}{12 c^2 f (-1+\sec (e+f x))^2 (a (1+\sec (e+f x)))^{3/2}} \]
[In]
[Out]
Time = 2.69 (sec) , antiderivative size = 202, normalized size of antiderivative = 0.94
method | result | size |
default | \(-\frac {\sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (27 \sqrt {2}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )+\sqrt {\cot \left (f x +e \right )^{2}-2 \csc \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )^{2}-1}\right )-96 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+62 \cot \left (f x +e \right )^{3}-4 \csc \left (f x +e \right ) \cot \left (f x +e \right )^{2}-42 \csc \left (f x +e \right )^{2} \cot \left (f x +e \right )\right )}{48 c^{2} f \,a^{2}}\) | \(202\) |
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 560, normalized size of antiderivative = 2.62 \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\left [-\frac {27 \, \sqrt {2} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {-a} \log \left (-\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 3 \, a \cos \left (f x + e\right )^{2} - 2 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 48 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {-a} \log \left (-\frac {8 \, a \cos \left (f x + e\right )^{3} + 4 \, {\left (2 \, \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - 7 \, a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) - 4 \, {\left (31 \, \cos \left (f x + e\right )^{3} - 2 \, \cos \left (f x + e\right )^{2} - 21 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{96 \, {\left (a^{2} c^{2} f \cos \left (f x + e\right )^{2} - a^{2} c^{2} f\right )} \sin \left (f x + e\right )}, \frac {27 \, \sqrt {2} {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 48 \, {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sqrt {a} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}{2 \, a \cos \left (f x + e\right )^{2} + a \cos \left (f x + e\right ) - a}\right ) \sin \left (f x + e\right ) + 2 \, {\left (31 \, \cos \left (f x + e\right )^{3} - 2 \, \cos \left (f x + e\right )^{2} - 21 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}}}{48 \, {\left (a^{2} c^{2} f \cos \left (f x + e\right )^{2} - a^{2} c^{2} f\right )} \sin \left (f x + e\right )}\right ] \]
[In]
[Out]
\[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\frac {\int \frac {1}{a \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )} - a \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )} - a \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )} + a \sqrt {a \sec {\left (e + f x \right )} + a}}\, dx}{c^{2}} \]
[In]
[Out]
\[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\int { \frac {1}{{\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {3}{2}} {\left (c \sec \left (f x + e\right ) - c\right )}^{2}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {1}{(a+a \sec (e+f x))^{3/2} (c-c \sec (e+f x))^2} \, dx=\int \frac {1}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{3/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \]
[In]
[Out]